[#assign demo=JspTaglibs["http://www.demo.com/tag-el"] /]
[#assign c=JspTaglibs["http://java.sun.com/jsp/jstl/core"] /]
[#assign s=JspTaglibs["/struts-tags"] /]
[#-- Display related macros --]

[#macro startPage pageTitle]
	[#assign pageTitle=pageTitle /]
	[#include "/pages/root/page-header.ftl"]
[/#macro]

[#macro endPage]
	[#include "/pages/root/page-footer.ftl"]
[/#macro]

[#macro menuPage name]
	[@demo.menuDisplayer name="FreemarkerMenu" config="/pages/component/menu/menu-left.ftl"]
		[@demo.menu name="${name}"/]
	[/@demo.menuDisplayer]
[/#macro]

[#macro errorMessageMultiple(caption, message, errors)]
	<div class="errormessage">
  		<p>
			<strong>${caption}</strong></p>
			${message}
            [#if errors?exists]
                [@s.iterator id="e" value="errors"]
                    [#assign e = stack.findString('top') /]
                    [#call error(e)]
                [/@s.iterator]
            [/#if]
        </p>
	</div>
[/#macro]

[#macro warningMessage ]
	[@s.if test="hasActionErrors()"]
		<div id="errorMessages" class="notification msgerror">
	        <a class="close"></a>
			[#list actionErrors as msg]
				<p>${msg}</p>
			[/#list]
	    </div><!-- notification msgerror -->
	[/@s.if]
[/#macro]

[#macro infoMessage]
	[@s.if test='hasActionMessages()']
		<div id="successMessages" class="notification msgsuccess">
			<a class="close"></a>
			[#list actionMessages as msg]
				<p>${msg}</p>
			[/#list]
		</div>
	[/@s.if]
[/#macro]

